package ControlLayer;
import java.sql.SQLException;
import ModelLayer.*;
import DBLayer.*;

public class CtrlCustomer {
	
	public void createCustomer (String cprno, String fname, String lname, String phoneno, String address, City city, Club club) {
		IFDBCustomer dbCustomer = new DBCustomer();
		Customer customerObj = new Customer();
		customerObj.setCprNo(cprno);
		customerObj.setFname(fname);
		customerObj.setLname(lname);
		customerObj.setPhoneNo(phoneno);
		customerObj.setAddress(address);
		customerObj.setCity(city);
		customerObj.setClub(club);
		
		try{
			dbCustomer.insertCustomer(customerObj);
		}catch(SQLException sql){
			System.out.println("SQLException in CtrlCustomer: "+sql);
			sql.printStackTrace();
		}
	}

}
